<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSql Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSql Class Reference<br /><sup><sup>[<a href="qtsql.html">QtSql</a> module]</sup></sup></h1><p>The QSql namespace contains miscellaneous identifiers used
throughout the Qt SQL library. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qsql.html#Location-enum">Location</a></b> { BeforeFirstRow, AfterLastRow }</li><li><div class="fn" />enum <b><a href="qsql.html#NumericalPrecisionPolicy-enum">NumericalPrecisionPolicy</a></b> { LowPrecisionInt32, LowPrecisionInt64, LowPrecisionDouble, HighPrecision }</li><li><div class="fn" />class <b><a href="qsql-paramtype.html">ParamType</a></b></li><li><div class="fn" />enum <b><a href="qsql.html#ParamTypeFlag-enum">ParamTypeFlag</a></b> { In, Out, InOut, Binary }</li><li><div class="fn" />enum <b><a href="qsql.html#TableType-enum">TableType</a></b> { Tables, SystemTables, Views, AllTables }</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSql namespace contains miscellaneous identifiers used
throughout the Qt SQL library.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Location-enum" />QSql.Location</h3><p>This enum type describes special SQL navigation locations:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSql.BeforeFirstRow</tt></td>
<td class="topAlign"><tt>-1</tt></td>
<td class="topAlign">Before the first record.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.AfterLastRow</tt></td>
<td class="topAlign"><tt>-2</tt></td>
<td class="topAlign">After the last record.</td>
</tr>
</table>
<p><b>See also</b> <a href="qsqlquery.html#at">QSqlQuery.at</a>().</p>


<h3 class="fn"><a name="NumericalPrecisionPolicy-enum" />QSql.NumericalPrecisionPolicy</h3><p>This enum type describes at which precision levels numercial
values are read from a database.</p>
<p>Some databases support numerical values with a precision that is
not storable in a C++ basic data type. The default behavior is to
bind these values as a <a href="qstring.html">QString</a>. This
enum can be used to override this behavior.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSql.LowPrecisionInt32</tt></td>
<td class="topAlign"><tt>0x01</tt></td>
<td class="topAlign">Force 32bit integer values. In case of
floating point numbers, the fractional part is silently
discarded.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.LowPrecisionInt64</tt></td>
<td class="topAlign"><tt>0x02</tt></td>
<td class="topAlign">Force 64bit integer values. In case of
floating point numbers, the fractional part is silently
discarded.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.LowPrecisionDouble</tt></td>
<td class="topAlign"><tt>0x04</tt></td>
<td class="topAlign">Force <tt>double</tt> values.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.HighPrecision</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The default behavior - try to preserve maximum
precision.</td>
</tr>
</table>
<p>Note: The actual behaviour if an overflow occurs is driver
specific. The Oracle database just returns an error in this
case.</p>


<h3 class="fn"><a name="ParamTypeFlag-enum" />QSql.ParamTypeFlag</h3><p>This enum is used to specify the type of a bind parameter.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSql.In</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The bind parameter is used to put data into
the database.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.Out</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">The bind parameter is used to receive data
from the database.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.InOut</tt></td>
<td class="topAlign"><tt>In | Out</tt></td>
<td class="topAlign">The bind parameter is used to put data into
the database; it will be overwritten with output data on executing
a query.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.Binary</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">This must be OR'd with one of the other flags
if you want to indicate that the data being transferred is raw
binary data.</td>
</tr>
</table>
<p>The ParamType type is a typedef for <a href="qflags.html">QFlags</a>&lt;ParamTypeFlag&gt;. It stores an OR
combination of ParamTypeFlag values.</p>


<h3 class="fn"><a name="TableType-enum" />QSql.TableType</h3><p>This enum type describes types of SQL tables.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSql.Tables</tt></td>
<td class="topAlign"><tt>0x01</tt></td>
<td class="topAlign">All the tables visible to the user.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.SystemTables</tt></td>
<td class="topAlign"><tt>0x02</tt></td>
<td class="topAlign">Internal tables used by the database.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.Views</tt></td>
<td class="topAlign"><tt>0x04</tt></td>
<td class="topAlign">All the views visible to the user.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSql.AllTables</tt></td>
<td class="topAlign"><tt>0xff</tt></td>
<td class="topAlign">All of the above.</td>
</tr>
</table>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>